/*
 * @Descripttion: GGB
 * @version: 1.0
 * @Author: GGB
 * @Date: 2021-08-17 07:51:03
 * @LastEditors: GGB
 * @LastEditTime: 2021-08-17 10:24:35
 */
import 'package:flutter/material.dart';
import 'package:flutter_data_center/model/camera/camera_model.dart';
import 'package:flutter_data_center/utills/color_utils.dart';
import 'package:flutter_svg/flutter_svg.dart';

class WarnItem extends StatelessWidget {
  const WarnItem({
    Key key,
    this.warning,
  }) : super(key: key);
  final Warnings warning;

  @override
  Widget build(BuildContext context) => ListTile(
        minLeadingWidth: 10,
        leading: SvgPicture.asset(
          "assets/icon/tag_circle.svg",
          width: 16,
          height: 16,
          color: Color(0xffFFB802),
        ),
        title: Text(
          warning.name,
          style: TextStyle(
            color: gColor("#ABABAB"),
            fontSize: 14,
            fontWeight: FontWeight.bold,
          ),
        ),
        subtitle: Container(
          height: 30,
          child: Row(
            children: [
              SvgPicture.asset(
                "assets/icon/icon_in.svg",
                width: 20,
                height: 20,
              ),
              SizedBox(width: 5),
              Text(
                warning.time,
                style: TextStyle(
                  color: gColor("#333333"),
                  fontSize: 14,
                ),
              ),
            ],
          ),
        ),
        trailing: Image.network(
          warning.snap,
          width: 57,
          height: 57,
          fit: BoxFit.cover,
        ),
      );
}
